package Chapter1.MaxSum;

import lombok.Data;

@Data
public class SumResult {
    /**
     * 累加之和
     */
    Double sum;

    /**
     * 开始位置
     */
    Integer start;

    /**
     * 结束位置
     */
    Integer end;

    public SumResult(){
        init();
    }

    public void init(){
        sum = Double.NEGATIVE_INFINITY;
        start = end = null;
    }

    public void assignment(SumResult source){
        this.sum = source.sum;
        this.start = source.start;
        this.end = source.end;
    }
}
